home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok10.lha
/
Speech
/
SayMore.mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
2KB
|
69 lines
(*********************************************************************
*
* :Program. SayMore.mod
* :Author. Michael Frieß
* :Address. Kernerstr. 22a
* :Address. 7000 Stuttgart 1
* :shortcut. [MiF]
* :Version. 1.0
* :Date. 01.11.88
* :Copyright. PD
* :Language. Modula-II
* :Translator. M2Amiga
* :Contents. Sprechen eines Textes
*
*********************************************************************)
MODULE SayMore;
FROM Arguments IMPORT NumArgs, GetArg;
FROM ASCII IMPORT eol;
FROM FileSystem IMPORT File, Lookup, Response, Close, ReadChar;
FROM Terminal IMPORT WriteString, WriteLn;
FROM Speech IMPORT OpenNarrator, CloseNarrator, SayPhonemes,
DefaultVoice, language, Translate;
FROM SYSTEM IMPORT ADR;
VAR Phonemes : ARRAY [0..600] OF CHAR;
FileName, Str : ARRAY [0..255] OF CHAR;
ch : CHAR;
i, Result : INTEGER;
n : LONGINT;
f : File;
BEGIN
IF NumArgs() # 1 THEN
WriteString ("USAGE: SayMore >FileName<"); WriteLn;
WriteLn;
WriteString ("SayMore says the text of FileName in German (!).");
WriteLn;
ELSE
GetArg (1, FileName, Result);
Lookup (f, FileName, 1000, FALSE);
IF f.res # done THEN
WriteString ("Datei konnte nicht eröffnet werden.");
WriteLn
ELSE
OpenNarrator (FALSE);
i := 0; Str := "";
WHILE NOT f.eof DO
ReadChar (f, ch);
IF (ch = eol) THEN
Str[i] := CHR(0);
Result := Translate (Str, Phonemes, German);
IF Result = 0 THEN
SayPhonemes (Phonemes, DefaultVoice)
END;
i := 0;
Str := ""
ELSE
Str[i] := ch;
INC(i);
END;
END;
CloseNarrator
END
END
END SayMore.